﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WoWAPI
{
	public class Race
	{
		private const string RACE_URL = "http://{0}.battle.net/api/wow/data/character/races";

		public int ID { get; set; }
		public int Mask { get; set; }
		public string Side { get; set; }
		public string Name { get; set; }

		public Race() { }

		public static Race[] GetRaces(string Region)
		{
			return API.DeserializeJSON<RaceCollection>(API.MakeWebRequest(String.Format(RACE_URL, Region))).Races; 
		}

		private class RaceCollection
		{
			public Race[] Races { get; set; }

			public RaceCollection() { }
		}
	}
}
